#pragma once
#include "DXAMLCommon.h"

#include "CNoParentShareableDependencyObject.h"
#include "CXcpList.h"
#include "CDependencyPropertyProxy.h"

class CType;
class CSetterBaseCollection;
class CBasedOnSetterCollection;

class CStyle :
	public CNoParentShareableDependencyObject
{

private: 
	CStyle(CCoreServices *);
	virtual ~CStyle();
	HRESULT ValidateBasedOnTargetType();
public: 
	static HRESULT Create(CDependencyObject * * ppObject, CREATEPARAMETERS * pCreate);
	HRESULT Seal();
	HRESULT GetTargetTypeName(CXString * * ppstrFullName);
	HRESULT GetProperties(CXcpList<CDependencyPropertyProxy> * * ppProperties);
	HRESULT GetPropertyValue(XUINT32 uPropertyId, XBOOL bIsCoreProperty, CValue * pValue, XBOOL * pbGotValue);
	static void ReleaseProperties(CXcpList<CDependencyPropertyProxy> * pProperties);
	virtual XBOOL ParticipatesInManagedTreeInternal();
	virtual XUINT32 Release();
	virtual HRESULT SetValue(CDependencyProperty * pdp, CValue * pValue);
	CSetterBaseCollection * GetSetterCollection();
	HRESULT CheckForBasedOnCircularReferences();
	virtual XUINT32 GetTypeIndex() const;
	CSetterBaseCollection * m_pSetters;
	XBOOL m_bIsSealed;
	CBasedOnSetterCollection * m_pBasedOnSetters;
	CStyle * m_pBasedOn;
	CType * m_pTargetType;
private: 
	XUINT32 m_cBasedOnCircularRefCount;
};